# Contributor: Bart Ribbers <bribbers@disroot.org>
# Maintainer: Bart Ribbers <bribbers@disroot.org>
pkgname=attica
pkgver=5.95.0
pkgrel=0
pkgdesc="Freedesktop OCS binding for Qt"
url="https://www.kde.org/"
arch="all !armhf" # Blocked by extra-cmake-modules
license="LGPL-2.0-or-later"
makedepends="qt5-qttools-dev extra-cmake-modules doxygen samurai"
options="!check" # failing on builders
subpackages="$pkgname-dev $pkgname-doc"
source="https://download.kde.org/stable/frameworks/${pkgver%.*}/attica-$pkgver.tar.xz"

build() {
	cmake -B build -G Ninja \
		-DCMAKE_BUILD_TYPE=MinSizeRel \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DCMAKE_INSTALL_LIBDIR=lib \
		-DBUILD_QCH=ON
	cmake --build build
}

check() {
	cd build
	CTEST_OUTPUT_ON_FAILURE=TRUE ctest
}

package() {
	DESTDIR="$pkgdir" cmake --install build
}

sha512sums="
51dfb53ebcaaac03306c256e156ad79c49f0c44ee01973fe3ecf55c7f0bee50c2f6032c3b3bcde1433cbad0df98a110e5ffc30657fdb02b10101c5111efac1ee  attica-5.95.0.tar.xz
"
